Set the proper state on the css node
authorMatthias Clasen <mclasen@redhat.com>
Wed, 4 May 2016 17:38:47 +0000 (13:38 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 4 May 2016 17:42:54 +0000 (13:42 -0400)
This will almost certainly overwritten before the widget gets
to the screen, but while we are doing this, we might as well
use the same state that we initialize the widgets state to.

gtk/gtkwidget.c

index 3ebec0108e37d2c5d4f3f7258ac99afb774c8511..6fde52e92fcce5777d6338082575c59ab1955efa 100644 (file)
@@ -4417,7 +4417,7 @@ gtk_widget_init (GTypeInstance *instance, gpointer g_class)
   _gtk_size_request_cache_init (&priv->requests);
 
   priv->cssnode = gtk_css_widget_node_new (widget);
-  gtk_css_node_set_state (priv->cssnode, GTK_STATE_FLAG_DIR_LTR);
+  gtk_css_node_set_state (priv->cssnode, priv->state_flags);
   /* need to set correct type here, and only class has the correct type here */
   gtk_css_node_set_widget_type (priv->cssnode, G_TYPE_FROM_CLASS (g_class));
   gtk_css_node_set_name (priv->cssnode, GTK_WIDGET_CLASS (g_class)->priv->css_name);